package com.swj.demo.controller;

import com.microservice.common.R;
import com.swj.demo.service.DemoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * write something please~
 *
 * @author huangrz
 * @since 2021/10/27
 **/
@Api("这是个Demo API")
@RestController
@RequestMapping("/demo")
public class DemoController {

    @Autowired
    private DemoService demoService;

    @ApiOperation("输出一个hello world字符串")
    @GetMapping("/helloWorld")
    public R<String> helloWorld() {
        return R.ok(demoService.helloWorld());
    }

}
